<!--
议案分类选择
@author luguoxiang
@Date: 2024/03/22 16:55
开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
-->
<template>
  <div class="lg-empty">
    <slot v-if="empty" name="empty">
      <div class="lg-empty-status">{{ text }}</div>
    </slot>
    <slot v-else></slot>
  </div>
</template>
<script>
export default {
  name: 'LgEmpty',
  props: {
    text: {
      type: String,
      default: '暂无数据',
    },
    data: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  computed: {
    empty() {
      return !this.data?.length;
    },
  },
};
</script>
<style scoped lang="less">
.lg-empty-status {
  line-height: 60px;
  color: #909399;
  text-align: center;
  font-size: 14px;
}
</style>
